/*
 * persistencia.c
 *
 *  Created on: 06/11/2011
 *      Author: utn_so
 */

#include "persistencia.h"

extern unsigned char* bootAndFats;
extern pthread_mutex_t mutex_asin_arch_disco;
extern FILE* archivoDisco;

int32_t persistirFAT(struct bootSector* boot)
{
	putFATRegion(0,boot->BPB_FATSz32+boot->BPB_RsvdSecCnt,bootAndFats);
	return 0;
}

int32_t persistirCluster(struct bootSector* boot, uint32_t cluster, unsigned char* clusterBuffer)
{

	uint32_t sector = firstSectorofCluster(boot, cluster);
	putCluster(0,sector,clusterBuffer);

	return 0;

}
